<?php

class Default_GuestbookEntriesSuccessView extends ProjectBaseView
{
	public function executeHtml(AgaviRequestDataHolder $rd)
	{
		$this->setupHtml($rd, "slot");
		
		$aktPage = $rd->getParameter('page');
		$maxPages = $this->getAttribute('maxPages');
		
		if($aktPage<$maxPages-1)	
		{
			$paging['forward'] = $this->ro->gen('guestbook', array('page'=>$aktPage+1));
			$paging['end'] = $this->ro->gen('guestbook', array('page'=>$maxPages-1));	
		} 
		if($aktPage>0) 
		{ 
	    	$paging['back'] = $this->ro->gen('guestbook', array('page'=>$aktPage-1));
	    	$paging['beginning'] = $this->ro->gen('guestbook', array('page'=>0));
	    	
		}
	 	else 
	 	{
	    $paging['back'] = false;
		}

		$this->setAttribute('paging', $paging);
	
	}
}

?>